package com.iteleven.generator.json;

import com.iteleven.generator.common.KafkaMsgSend;

public class AultonIotRecord2 {

    public static void main(String[] args) {

        String templateStr = "{\"head\" : {\"type\":\"01\",\"owner\":\"上汽\",\"dataProtocolType\":\"x01\",\"receiveTime\":\"18382929\",\"pushTime\":\"2022-08-24 14:34:36\",\"DtoName\" : \"com.aulton.datapush.bigdata.dto.model.vehicle.a37.A37BatteryInfoDto\"},\"data\" : {\"batteryId\":\"发发发发发发付付付\",\"sysTime\":\"17383929\",\"isRepublish\":\"0\",\"data\" : {\"alarmLevel\":\"1\",\"maxOutCur\":\"10002\",\"maxBackCur\":\"109393\",\"alarmData0\" : \"xxxxx\"},\"gps\":{\"positionStatus\":\"1\",\"longitude\":\"12.03003\",\"latitude\":\"39.030203\",\"speed\":\"20\"}}}";

        for (int i = 0; i < 1000000; i++) {
            KafkaMsgSend.send("http://localhost:8889/ReportToKafkaApplication/retriveData", "iot_topic_2", templateStr);

            System.out.println(templateStr);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
